/*
 * File Name:               UIMutexParent.cs
 * 
 * Description:             UI互斥组件 父节点
 * Author:                  lisiyu <576603306@qq.com>

 * Create Date:             2017/03/20
 */

using UnityEngine;
using UnityEngine.EventSystems;

[ExecuteInEditMode]
public class UIMutexParent : UIBehaviour
{
    private int mOldState = -1;
    public int CurrentState;
    public UIMutexChild[] Childs;

    void LateUpdate()
    {
        if (mOldState == CurrentState)
            return;

        mOldState = CurrentState;

        if (Childs == null) return;
        foreach(var child in Childs)
        {
            child.display(CurrentState);
        }
    }
}
